package fr.generali.sas.controller.v1_0.json;

import javax.xml.bind.JAXBElement;

import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.SerializationConfig;

import fr.generali.sas.model.v1_0.Erreur;
import fr.generali.sas.model.v1_0.Flux;
import fr.generali.sas.model.v1_0.InfoClientResponse;
import fr.generali.sas.model.v1_0.NotificationIntegrationResponseType;
import fr.generali.sas.model.v1_0.StatutType;

public class SasClientObjectMapper extends ObjectMapper {
	
	public  SasClientObjectMapper() {
		super();
		init();
	}
	
	public void init() {
		this.configure(SerializationConfig.Feature.WRITE_DATES_AS_TIMESTAMPS, false);
		this.getSerializationConfig().addMixInAnnotations(InfoClientResponse.class, MixIn.class);
		this.getDeserializationConfig().addMixInAnnotations(InfoClientResponse.class, MixIn.class);
		this.getSerializationConfig().addMixInAnnotations(Flux.class, MixIn.class);
		this.getDeserializationConfig().addMixInAnnotations(Flux.class, MixIn.class);
		this.getSerializationConfig().addMixInAnnotations(JAXBElement.class, MixIn.class);
		this.getDeserializationConfig().addMixInAnnotations(JAXBElement.class, MixIn.class);
		this.getSerializationConfig().addMixInAnnotations(Erreur.class, MixIn.class);
		this.getDeserializationConfig().addMixInAnnotations(Erreur.class, MixIn.class);
		this.getSerializationConfig().addMixInAnnotations(NotificationIntegrationResponseType.class, MixIn.class);
		this.getDeserializationConfig().addMixInAnnotations(NotificationIntegrationResponseType.class, MixIn.class);
		this.getSerializationConfig().addMixInAnnotations(StatutType.class, MixIn.class);
		this.getDeserializationConfig().addMixInAnnotations(StatutType.class, MixIn.class);
		
	}

}
